import { Redirect,useModel } from 'umi';
function System({ location }) {
  const { initialState,loading } = useModel('@@initialState');
  const {menuList} = initialState.info;
  const path = location.pathname;
  const url = path + menuList?.find((x) => x.url === path).children[0].url;
  return loading ? '' :<Redirect to={url} />;
}

export default System;
